Efficient Triangle and Quadrilateral Clipping Within Shaders
نویسنده
چکیده
Clipping a triangle or a convex quadrilateral to a plane is a common operation in computer graphics. This clipping is implemented by fixed-function units within the graphics pipeline under most rasterization APIs. It is increasingly interesting to perform clipping in programmable stages as well. For example, to clip bounding volumes generated in the Geometry unit to the near plane, or to clip an area light source to the tangent plane of a surface in a Pixel unit. While clipping a convex polygon is algorithmically trivial, doing so efficiently on vector architectures like GPUs can be tricky. This article presents an efficient implementation of Sutherland-Hodgman clipping for vector processors. It has high branch coherence, uses only register storage (i.e., it does not require a move-relative memory operation), leverages both data and instruction parallelism, and has a peak register count of only two 4-vectors (7 scalars). I found it to be about five times faster than direct Sutherland-Hodgman and yield a 45% increase in net throughput when applied in the algorithm from a previous publication on two different GPU architectures. The principles of optimization presented for this class of parallel algorithm extend to other algorithms and architectures. The result of clipping a primitive by a plane is the intersection of the primitive and the positive half-space bounded by the plane. If the input primitive is a convex polygon with k vertices, then result is expressible as a convex polygon with k + 1 vertices, assuming we allow a zero-area polygon to represent the empty intersection and allow the result to contain degenerate vertices. Clipping arises frequently in computer graphics. For example, one often clips 3D polygons to the near plane so that their 2D projection is continuous and easy to rasterize or bound. An increasing number of algorithms © A K Peters, Ltd. 1 1086-7651/06 $0.50 per page
منابع مشابه
Efficient Face-Based Non-Split Connectivity Compression for Quad and Triangle-Quad Meshes
In this paper we present an efficient face-based connectivity coding technique for the special class of quadrilateral and the hybrid triangular-quadrilateral meshes. This work extends the main ideas of non-split encoding presented by the first contribution of the authors (Khattab, Abd El-Latif, Abdel Wahab and Tolba, 2007) for triangle meshes and improves over the compression results provided s...
متن کاملQuadrilateral Remeshing
The use of polygonal meshes, especially triangle meshes, is manifold but a lot of algorithms require the mesh to be structured in a certain way and cannot be applied to an arbitrarily shaped mesh. The process of replacing an arbitrary mesh by a structured one is called remeshing. Triangle meshes with subdivision connectivity are an important class of structured meshes and have been studied thor...
متن کاملConstructing Hamiltonian Triangle Strips on Quadrilateral Meshes
Because of their improved numerical properties, quadrilateral meshes have become a popular representation for finite elements computations and computer animation. In this paper we address the problem of optimally representing quadrilateral meshes as generalized triangle strips (with one swap bit per triangle). This is important because 3D rendering hardware is optimized for rendering triangle m...
متن کاملA General and Efficient Representation for Multiresolution Meshes: Application to Quad/Triangle Subdivision
Quad/triangle subdivision unifies triangular and quadrilateral subdivision schemes. Despite its interest, this scheme is rarely used in the multiresolution edition framework, mainly because of the lack of a sufficiently general data structure that allows a simple and efficient implementation of multiresolution meshes built with it. We show in this paper how multiresolution half-edges, defined a...
متن کاملPhong Splatting
Surface splatting has developed into a valuable alternative to triangle meshes when it comes to rendering of highly detailed massive datasets. However, even highly accurate splat approximations of the given geometry may sometimes not provide a sufficient rendering quality since surface lighting mostly depends on normal vectors whose deviation is not bounded by the Hausdorff approximation error....
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- J. Graphics, GPU, & Game Tools
دوره 15 شماره
صفحات -
تاریخ انتشار 2011